
//
//  common.h
//  ccZone
//
//  Created by 陈小娟 on 2017/12/13.
//  Copyright © 2017年 CC. All rights reserved.
//

#if DEBUG
#define RSDLog(FORMAT, ...) fprintf(stderr,"\nfunction:%s line:%d content:%s\n", __FUNCTION__, __LINE__, [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String])
#else
#define RSDLog(FORM/Users/chenxiaojuan/Desktop/Raykart/gokarting/gokarting/CommonFile/Raykart.pchAT, ...) nil
#endif


#define WS(wSelf)  __weak __typeof(&*self)wSelf = self;

#define kTYIMAGE(_ref) (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) ||([(_ref)isEqualToString:@""]))?([UIImage imageNamed:@"ty_default_square"]):([UIImage imageNamed:(_ref)])

#define kCCFont(_ref) [UIFont systemFontOfSize:_ref]
#define TY_RGB(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
//浅色：rgb(162,162,162)
//黑色：rgb(34,28,28)
//背景颜色：242,242,242。 f2f2f2
#define TY_NAV        [UIColor colorWithRed:174/255.0 green:214/255.0 blue:214/255.0 alpha:1.0]

#define TY_DEVIDE    [UIColor colorWithRed:174/255.0 green:214/255.0 blue:214/255.0 alpha:1.0]

#define PORTRAIT_MAIN_SCREEN_W MIN([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)
#define PORTRAIT_MAIN_SCREEN_H MAX([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height)

#define isIPhoneX (MAX([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height) > 811)

//空判断---字符串
#define IsStrEmpty(_ref)    (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) ||([(_ref)isEqualToString:@""]))
//空判断---数组
#define IsArrEmpty(_ref)    (((_ref) == nil) || ([(_ref) isEqual:[NSNull null]]) ||([(_ref) count] == 0))

//求最小
#define myMIN(a,b) (((a)<(b))?(a):(b))
#define myMIN3(a,b,c) myMIN(myMIN(a,b),c)
//safeArea
//顶部导航栏
#define SafeAreaTopHeight (kWJScreenHeight == 812.0 ? 88 : 64)
//底部视图
#define SafeAreaBottomHeight (kWJScreenHeight == 812.0 ? 34 : 0)

#define kUrl(_ref) [NSString stringWithFormat:@"http://localhost:8888/project_cc_source/%@",_ref]


#define kCCZoneBundleId @"com.CC.ccZone"




